package com.rgst.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import com.rgst.interceptor.BaseInterceptor;


/**
 * Created by tancw on 2017/1/24.
 */
@Configuration
public class MvcConfig implements WebMvcConfigurer {

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        InterceptorRegistration ir = registry.addInterceptor(new BaseInterceptor());
        ir.excludePathPatterns("/login");
        ir.excludePathPatterns("/toLogin");
        ir.addPathPatterns("/**");
    }
}
